from django.db import models

# Create your models here.
# class User(models.Model):
#     name=models.IntegerField()
#     password=models.CharField(max_length=20)
#     phone=models.IntegerField()
# class Cate(models.Model):
#     name=models.CharField(max_length=25)
#     pid=models.ForeignKey('self',on_delete=models.SET_NULL,null=True,blank=True)
# class Site(models.Model):
#     user_id = models.IntegerField()
#     name = models.CharField(max_length=20)
#     province = models.CharField(max_length=20)
#     city = models.CharField(max_length=20)
#     district = models.CharField(max_length=20)
#     phone = models.IntegerField()
#     site = models.CharField(max_length=20)
#     is_delete = models.BooleanField()
#     is_default = models.BooleanField()
#     Landline = models.IntegerField()
#     mailbox = models.CharField(max_length=20)
# class Classify(models.Model):
#     name = models.CharField(max_length=20)
#     img = models.CharField(max_length=100)
#     f_id = models.IntegerField()
#     grade = models.IntegerField()
#     d_id = models.IntegerField()
# class Goods(models.Model):
#     name = models.CharField(max_length=20)
#     price = models.DecimalField(max_digits=7,decimal_places=2)
#     repertory = models.IntegerField()
#     sales = models.IntegerField()
#     introduce = models.CharField(max_length=100)
#     img = models.CharField(max_length=100)
#     evaluate = models.IntegerField()
#     classify = models.CharField(max_length=20)
#     after_sale = models.CharField(max_length=100)
#     packaging = models.CharField(max_length=100)
#     describe = models.CharField(max_length=100)
# class Collect(models.Model):
#     user_id=models.IntegerField()
#     shop_id=models.IntegerField()
# class Shopp(models.Model):
#     shop_id=models.IntegerField()
#     xuan=models.BooleanField()
#     user_id=models.IntegerField()
#     num=models.IntegerField()
# from users.mm import BaseModel
#
#
# class Comment(BaseModel):
#     user = models.ForeignKey(user, on_delete=models.CASCADE)
#     goods = models.ForeignKey(goods, on_delete=models.CASCADE)
#     content = models.TextField()
#     start = models.IntegerField(null=True)  # 星星
#     show_user = models.IntegerField(default=1, null=True)  # 是否匿名
#
#     class Meta:
#         db_table = 'comment'
#
#
# class OrderInfo(BaseModel):
#     """
#     订单信息
#     """
#
#     PAY_METHOD_CHOICES = (
#         (1, "货到付款"),
#         (2, "支付宝"),
#     )
#
#     ORDER_STATUS_CHOICES = (
#         (1, "待支付"),
#         (2, "待发货"),
#         (3, "待收货"),
#         (4, "待评价"),
#         (5, "已完成"),
#         (6, "已取消"),
#     )
#
#     order_no = models.CharField(max_length=64, primary_key=True, verbose_name="订单号")
#     user = models.ForeignKey(user, on_delete=models.PROTECT, verbose_name="下单用户")
#     address = models.CharField(max_length=255, verbose_name="收获地址")
#     total_amount = models.DecimalField(max_digits=10, decimal_places=2, verbose_name="商品总金额")
#     pay_method = models.IntegerField(choices=PAY_METHOD_CHOICES, default=1, verbose_name="支付方式")
#     status = models.IntegerField(choices=ORDER_STATUS_CHOICES, default=1, verbose_name="订单状态")
#     transaction_no = models.CharField(max_length=100)
#
#     class Meta:
#         db_table = "order_info"
#         verbose_name = '订单基本信息'
#         verbose_name_plural = verbose_name
# class OrderDetail(BaseModel):
#     """
#     订单商品
#     """
#     order = models.ForeignKey(OrderInfo, to_field='order_no', on_delete=models.CASCADE, verbose_name="订单",
#                               related_name='details')
#     goods = models.ForeignKey(Goods, on_delete=models.CASCADE)
#     goodsname = models.CharField(max_length=100)
#     images = models.CharField(max_length=100)
#     count = models.IntegerField(default=1, verbose_name="数量")
#     price = models.DecimalField(max_digits=10, decimal_places=2, verbose_name="单价")
#     user = models.ForeignKey(User, on_delete=models.CASCADE)

class New(models.Model):
    title=models.CharField(max_length=20)
    content=models.CharField(max_length=30)
# class Ad(models.Model):
#     img=models.CharField(max_length=20)
#     tiao=models.CharField(max_length=20)
#     lei=models.CharField(max_length=20)